<template>
  <div class="change-class">
    <img class="success-icon" src="/static/images/singUp/success-icon.png" alt="success">
    <p class="tips-title">订单提交成功</p>
    <p class="tips-small">请联系校区老师进行其他方式支付</p>
    <div class="back" @click="goBack">知道了</div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      from: "", // 记录页面来源 1 报名 2 续费 3 装备购买 4 装备兑换
    }
  },
  onLoad(e) {
    // url中传递了from参数，1 报名 2 续费 3 装备购买 4 装备兑换
    this.from = e.from;
  },
  methods: {
    goBack(from) {
      from = this.from;
      if(from == '1' || from == '2'){
        wx.switchTab({
          url: '/pages/index/main'
        })
      } else {
        wx.switchTab({
          url: '/pages/my/main'
        })
      }
    }
  },
}
</script>

<style lang="less" scope>
.change-class{
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  .success-icon{
    width: 155px;
    height: 105px;
    display: block;
  }
  .tips-title{
    font-weight: bold;
    font-size: 18px;
    color: #333;
    margin: 34px 0 18px 0;
  }
  .tips-small{
    font-size: 14px;
    color: #333;
    margin-bottom: 56px;
  }
  .back{
    width:  260px;
    height: 50px;
    font-size: 16px;
    color: #fff;
    text-align: center;
    line-height: 50px;
    background:rgba(0,184,238,1);
    border-radius: 3px;
    margin: 0 auto 150px auto;
  }
}
</style>
